import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'index',
      component: (resolve) => require(['@/pages/index'], resolve),
    },
    {
      path: '/admin/login',
      name: 'AdminLogin',
      component: (resolve) => require(['@/pages/admin/login'], resolve),
      meta: {
        title: "管理员登录",
        breadcrumb: ["登录"]
      }
    },
    {
      path: '/admin/register',
      name: 'AdminRegister',
      component: (resolve) => require(['@/pages/admin/register'], resolve),
      meta: {
        title: "机构注册",
        breadcrumb: ["注册"]
      }
    },

    {
      path: '/admin',
      component: (resolve) => require(['@/pages/admin/Layout'], resolve),
      children: [{
          path: '/admin/',
          name: 'Admin',
          component: (resolve) => require(['@/pages/admin/index'], resolve),
          meta: {
            title: "首页",
            breadcrumb: ["首页"]
          },
        },
        {
          path: '/admin/business/student/index',
          name: 'AdminBusinessStudentIndex',
          component: (resolve) => require(['@/pages/admin/business/student/index'], resolve),
          meta: {
            title: "学生档案",
            breadcrumb: ["业务中心", "学员档案"]
          },
        },

        {
          path: '/admin/educational/student/index',
          name: 'AdmineducationalStudentIndex',
          component: (resolve) => require(['@/pages/admin/educational/student/index'], resolve),
          meta: {
            title: "学员管理",
            breadcrumb: ["教务管理", "学员管理"]
          },
        },
        {
          path: '/admin/educational/student/addcourse',
          name: 'AdmineducationalStudentAddcourse',
          component: (resolve) => require(['@/pages/admin/educational/student/addcourse'], resolve),
          meta: {
            title: "报名课程",
            breadcrumb: ["教务管理", "报名课程"]
          },
        },
        {
          path: '/admin/educational/student/detail',
          name: 'AdminBusinessStudentDetail',
          component: (resolve) => require(['@/pages/admin/educational/student/detail'], resolve),
          meta: {
            title: "学生档案",
            breadcrumb: ["业务中心", "学员档案"]
          },
        },
        {
          path: '/admin/educational/class/index',
          name: 'AdminEducationalClassList',
          component: (resolve) => require(['@/pages/admin/educational/class/index'], resolve),
          meta: {
            title: "班级管理",
            breadcrumb: ["教务管理","班级管理"]
          },
        },
        {
          path: '/admin/educational/class/detail',
          name: 'AdminEducationalClassDetail',
          component: (resolve) => require(['@/pages/admin/educational/class/detail'], resolve),
          meta: {
            title: "班级详情",
            breadcrumb: ["教务管理","班级详情"]
          },
        },
        {
          path: '/admin/educational/timetable/index',
          name: 'AdminEducationalTimetableDetail',
          component: (resolve) => require(['@/pages/admin/educational/timetable/index'], resolve),
          meta: {
            title: "课表管理",
            breadcrumb: ["教务管理","课表管理"]
          },
        },
        {
          path: '/admin/educational/course/index',
          name: 'AdminEducationalCourseList',
          component: (resolve) => require(['@/pages/admin/educational/course/index'], resolve),
          meta: {
            title: "课程列表",
            breadcrumb: ["课程列表","课程管理"]
          },
        },
        {
          path: '/admin/educational/classroom/index',
          name: 'AdminEducationalClassroomList',
          component: (resolve) => require(['@/pages/admin/educational/classroom/index'], resolve),
          meta: {
            title: "教室管理",
            breadcrumb: ["教务管理","教室管理"]
          },
        },
        {
          path: '/admin/educational/teacher/index',
          name: 'AdminEducationalTeacherList',
          component: (resolve) => require(['@/pages/admin/educational/teacher/index'], resolve),
          meta: {
            title: "教师管理",
            breadcrumb: ["教务管理","教师管理"]
          },
        },
        {
          path: '/admin/system/school/index',
          name: 'AdminSystemSchoolIndex',
          component: (resolve) => require(['@/pages/admin/system/school/index'], resolve),
          meta: {
            title: "机构管理",
            breadcrumb: ["系统管理","机构管理"]
          },
        },
        {
          path: '/admin/system/permission',
          name: 'AdminSystemPermission',
          component: (resolve) => require(['@/pages/admin/system/permission/index'], resolve),
          meta: {
            title: "系统设置",
            breadcrumb: ["系统设置", "权限设置"]
          },
        },
        {
          path: '/admin/system/permission',
          name: 'AdminSystemPermission',
          component: (resolve) => require(['@/pages/admin/system/permission/index'], resolve),
          meta: {
            title: "系统设置",
            breadcrumb: ["系统设置", "权限设置"]
          },
        }, {
          path: '/admin/system/basic/index',
          name: 'AdminSystemBasic',
          component: (resolve) => require(['@/pages/admin/system/basic/index'], resolve),
          meta: {
            title: "基本信息",
            breadcrumb: ["系统设置", "基本信息"]
          },
        }
      ]
    }
  ],
})
